package com.lin.entity;

import lombok.Data;

@Data
public class ResponseData {
    /**
     * 判断 评论是否成功
     */
    private boolean success;
    /**
     * 信息
     */
    private String msg;

    /**
     * 统一创建成功:ResponseData
     *
     * @return
     */
    public static ResponseData OK() {
        ResponseData responseData = new ResponseData();
        responseData.setSuccess(true);
        responseData.setMsg("成功!");
        return responseData;
    }
    /**
     * 统一创建失败:ResponseData
     *
     * @return
     */
    public static ResponseData FAILED() {
        ResponseData responseData = new ResponseData();
        responseData.setSuccess(false);
        responseData.setMsg("失败!");
        return responseData;
    }
}
